1. Field of Invention
This invention relates to lighting systems for vision systems.
2. Description of Related Art
The light output of any device is a function of many variables. Some of the variables include the instantaneous driving current, the age of the device, the ambient temperature, whether there is any dirt or residue on the light source, the performance history of the device, etc. Machine vision instrument systems typically analyze features or objects within their field of view using methods which may determine, among other things, the contrast within the region of interest where the features or objects may be found. To some degree, this determination is affected by the character of incident light or transmitted light.
A machine vision system programmer or operator often wishes to illuminate a workpiece so as to achieve a specific image characteristic. The image characteristic may be a specific average gray level value in a region of interest or a goal such as to maximize the difference in average gray level between various regions of interest, or to maximize a gradient within a region of interest. More generally, the desired characteristic may be a complex series of goals defined across an image scan line.
In many applications, the relationship between the imaging subsystem and the workpiece under inspection is predictable. In such applications, the predictability of the situation allows a simple form of reproducible lighting control. As illustrated in U.S. Pat. No. 5,753,903 to Mahaney, for example, closed-loop control systems are used to ensure that the output light intensity of a light source of a machine vision system was driven to a particular command level. These conventional closed-loop control systems prevent the output light intensity from drifting from the desired output light intensity due to variations in the instantaneous drive current, the age of the light source, the ambient temperature, or the like. Accordingly, it is possible to determine a level for a single, spatially fixed illumination source and an actual workpiece.
However, even when such a simple form of reproducible lighting control is possible, performing a search for an optimal light source setting can become problematic because each of the steps of light adjustment, acquisition of each video frame, and evaluation of each video frame, requires a finite period of time. In particular, common halogen lights require a period of time to stabilize their output after their current drive is altered. Thus, although there are several conventional approaches to choose a satisfactory light for a given workpiece and a single fixed light source, there may be some associated delays which reduce the available throughput of the associated vision system.
Methods are also known for creating macroscopic synthetic images through so-called xe2x80x9cimage fusionxe2x80x9d of an illumination series. These methods generally deal with cases where different sub-regions of an object cannot simultaneously be adequately illuminated, yet it is desirable to combine the different sub-regions into a single macroscopic image of a region of interest that is everywhere adequately illuminated. Such macroscopic images can give an enhanced qualitative view of an object. In such methods, an illumination source is systematically varied. A series of images of the region of interest are acquired. Then, for each sub-region, the xe2x80x9cbestxe2x80x9d images from the series are determined, xe2x80x9cfusedxe2x80x9d, and combined into a macroscopic synthetic image that is presumably everywhere well-illuminated.
It is noteworthy that, in such methods, selecting the illumination settings for each of image the illumination series is considered problematic.
Thus, an exhaustive, systematic variation of hardware lighting settings and image acquisition is performed to ensure that at least one acceptable image of each sub-region is obtained. Such a systematic variation is little more than a conventional trial and error approach, which is time consuming and inappropriate for many types of vision system operations where higher throughput is beneficial.
Furthermore, this method is not well-suited to achieve the most desirable image of any particular sub-region, since one of a reasonable number of brute-force systematic variations is unlikely to precisely coincide with the most desirable illumination settings for any particular sub-region. This is particularly unlikely if a number of different light sources are considered. Yet, for many machine vision applications, achieving the most desirable settings for a particular sub-region is the most important consideration.
Additionally, the complicated xe2x80x9cfusionxe2x80x9d process may produce unexpected results in the synthetic image. These unexpected results are generally not acceptable for applications requiring precise quantitative analysis of features on an object.
Thus, considering the problems of throughput, quantitative accuracy in the final image, and the ability to adapt to a variety of unpredictable workpiece features and configurations, conventional methods do not offer a reasonable solution for determining the most desirable illumination setting for a region of interest. This is particularly true when using multiple illumination sources. This problem is particularly significant in the design of a fully automated off-line part program generation system.
Thus, there is a need for a method for precisely acquiring an image regardless of the overhead, or time consumption, involved, and that achieves the desired image characteristics. Such a process could implement the use of a standard or novel search technique to search the problem landscape for the desired illumination setting, that is, the lighting settings for each of the various lighting sources. Currently, the main problem associated with conducting a trial and error search for a desirable combination of multiple light source settings is the overhead associated with changing the output power of each lamp and waiting for the trial images to be acquired and evaluated.
This invention provides systems and methods that allow a vision system to search for a desirable combination of multiple light source settings in a relatively short time.
This invention separately provides systems and methods that allow a vision system to identify a most desirable combination of multiple light source settings for any of a variety of feature analyses that are reliable, robust, and readily adaptable.
This invention separately provides systems and methods that simulate the effects of combinations of multiple light sources on an object to be viewed.
This invention further provides systems and methods that simulate the effects of multiple light sources on the object by sampling the actual effects of individual light sources on a number of intensity levels on the object.
This invention further provides systems and methods that sample intensities for single light sources and combine the interpolated results.
This invention further provides systems and methods that allow simulations of actual lighting effects of multiple lighting sources on an object to be generated based on discretely sampled intensity levels of each of the multiple light sources.
This invention further provides systems and methods that allow simulations of actual lighting effects of multiple lighting sources on an object to be generated based on relatively few discretely sampled intensity levels of each of the multiple light sources.
In various exemplary embodiments of the systems and methods according to this invention, an actual object to be viewed using the vision system is placed within the overall field of view of the vision system. Depending on the desired analysis to be made, either the entire object, or a specific portion of the object including a region of interest, is illuminated using an illumination setting including at least one of the various illumination sources of the vision system. A plurality of actual images of the object, or of the particular portion of the object, are captured, where each captured image is illuminated using a different illumination intensity of at least one such illumination source. This is repeated as necessary for the different illumination sources provided in the vision system. In various exemplary embodiments of the systems and methods according to this invention, each illumination source is used and varied independently of other sources, in the above process.
A simulation is performed to determine the effects of the multiple lighting sources on the object, or on the particular portion of the object, using any combination of the various lighting sources and using any combination of output intensities of the lighting sources. In order to direct the simulation toward the desired end, a user defines or selects a particular desired metric that is relevant to the analysis to be performed on the captured image of the object, or the portion of the object. The user also defines the specific portion of the image data of the captured image of the object, or the desired portion of the object, to be used. A combination of the multiple lighting sources is selected for simulation, as is a particular driving intensity for each of the lighting sources. If, for any selected lighting source, that lighting source is driven at a level that does not exactly correspond to one of the captured images for that lighting source, the intensity of that lighting source at the selected driving value is interpolated between the two or more of the actual values.
The resulting interpolated simulated images are then summed, on a pixel-by-pixel basis, to determine the net light intensity received from the object by the image capture device if the actual object were to be actually illuminated using the various selected lighting sources driven at the selected driving values. The resulting pixels of the simulated image that correspond to the pixels selected for analysis can then be evaluated to determine if the selected lighting sources and the selected drive values for those lighting sources result in the desired quality of illumination of the actual part, were that part actually illuminated, at the selected drive values, using the selected lighting sources.
For example, in various exemplary embodiments, the user can define, as the metric, to maximize the largest peak gradient in the scan line of interest. Another image characteristic metric can be to maximize the height of an edge peak while minimizing overall variation, i.e., texture, along a scan line. Depending on the metric chosen, various different search methods can be used during or following the simulation, ranging from simple to more complex methods. Furthermore, the search can be enhanced based on prior knowledge, i.e., the part being opaque and blocking the stage light.
In contrast to the previously discussed conventional methods, in various exemplary embodiments of the systems and methods according to this invention, slow hardware trial-and-error procedures are reduced, minimized or avoided completely. The previously known methods acquired an extensive image series to create final synthetic image. This final synthetic image is likely to be no better than the best previous image in the series in a particular sub-region of interest, and which is of dubious value for precise quantitative feature analysis. In contrast to these conventional methods, the systems and methods according to this invention acquire a relatively limited set of images, to rapidly determine hardware settings usable to acquire a final real image. These hardware settings may be selected for precise quantitative feature analysis in a particular sub-region of interest of the final real image.
These and other features and advantages of this invention are described in, or are apparent from, the following detailed description of various exemplary embodiments of the systems and methods according to this invention.